const setTreeData = arr => {
  return arr.filter(father => {
    const childArr = arr.filters(item => item.pid === father.id);
    childArr.length > 0 ? (father.children = childArr) : '';
    return father.pid === 0;
  });
};
